package sunsun.xiaoli.jiarebang.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

/**
 * Created by Administrator on 2017/4/27.
 */

public class BluetoothDeviceDBHelper extends SQLiteOpenHelper {

    private static String DBNAME = "BLE_DEVICE.db";
    public static String TABLENAME = "BLE_DEVICE_TABLE";
    String dbSql = ("create table " + TABLENAME + " (id Integer primary key,ble_name text,ble_addr text,ping text,add_time text)");

    public BluetoothDeviceDBHelper(Context context) {
        super(context, DBNAME, null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase db) {
        db.execSQL(dbSql);
    }

    @Override
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {

    }
}
